package com.dropdb.demo.bean.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author Alone
 * @version 1.0
 * @date 2020/7/2 15:51
 */
@Data
public class WxGoodsVO {
    private Integer id;

    @NotBlank(message = "商品编号不能为空")
    private String goodsSn;

    @NotBlank(message = "商品名称不能为空")
    private String name;

    private Integer categoryId;

    private Integer brandId;

    private String[] gallery;

    private String keywords;

    private String brief;

    private Boolean isOnSale;

    private Short sortOrder;

    private String picUrl;

    private String shareUrl;

    private Boolean isNew;

    private Boolean isHot;

    private String unit;

    //@Pattern(regexp = "^[0-9]+\\.{0,1}[0-9]*$", message = "参数值不对")
    private Double counterPrice;

    //@Pattern(regexp = "^[0-9]+\\.{0,1}[0-9]*$", message = "参数值不对")
    private Double retailPrice;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date addTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    private Boolean deleted;

    private String detail;
}
